Dim strDirectoryName As String 'Holds the name of the directory from which VisiBase was launched. Used to create a full path for accessing the database records and the photographs.
'The "intEntry" variable is set or reset throughout the project to prevent multiple triggering of Text Box updates.
' without "intEntry" the program would not know whether or not the user were changing (editing) the database,
' or simply moving through it, viewing records. See the AddRecord Event for more.
Dim intEntry As Integer
Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName As Any, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%, ByVal lpFileName$)
Dim strWordDir$ ' Used to get the results from the GetWordDir function
'UpdateOptions
Const OLE_AUTOMATIC = 0
Const OLE_MANUAL = 2
'OLE Control Actions
Const OLE_UPDATE = 6
Sub AddRecord_Click ()
Dim n As String
Static toggle As Integer
toggle = Not toggle
If toggle = True Then
addrecord.Caption = "Confir&m"
intEntry = True
Else
addrecord.Caption = "&Add"
intEntry = False
End If
On Error Resume Next
If intEntry = True Then 'just starting an intEntry
datEmployeeDatabase.Recordset.AddNew
txtFirstName.SetFocus
Else 'confirming an intEntry
datEmployeeDatabase.Recordset.Update
If Err Then
addrecord.Caption = "Confir&m"
toggle = Not toggle
End If
datEmployeeDatabase.Recordset.MoveLast
txtFirstName.SetFocus
End If
End Sub
Sub AddRecord_MouseMove (Button As Integer, Shift As Integer, x As Single, Y As Single)
helpbar.Caption = " Click here to add a new employee record."
End Sub
Sub Change_Click ()
On Error Resume Next
Dim n As String, a As String
Dim fh As Integer
Dim bmpdat As String
helpbar.Caption = " UPDATING WINWORD DOCUMENT." 'Explain the pause to the user
Dim WordObj As object, years As Variant, le As Single